package sum;

public class Solution {
    public int sum(int num1, int num2) {
        // 位运算

        // 1001
        // 1011 &
        //10010
        while (num2!=0){
            int t = (num1&num2)<<1;// 进位
            num1^=num2;
            num2 = t;
        }
        return num1;
    }
}
